package com.bdsy.business.service.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.bdsy.business.dao.AuctionShopMapper;
import com.bdsy.business.model.AuctionShop;
import com.bdsy.business.service.AuctionShopService;

@Service
public class AuctionShopServiceImpl implements AuctionShopService {

	@Autowired
	private AuctionShopMapper auctionShopMapper;
	
	@Override
	public List<Map> selectAuctionShop(int shopTypeId,int auctionStatus) {
		 @SuppressWarnings("rawtypes")
		List<Map> auctionShopList = auctionShopMapper.selectAuctionShop(shopTypeId,auctionStatus);
		return auctionShopList;
	}

	@Override
	public boolean update(AuctionShop auctionShop) {
		int result = auctionShopMapper.update(auctionShop);
		return result>0?true:false;
	}

	@Override
	public boolean add(AuctionShop auctionShop) {
		int result = auctionShopMapper.add(auctionShop);
		return result>0?true:false;
	}

	@Override
	public List<Map> selectAuctionShopDetailsByShopId(int shopId) {
		List<Map> auctionShop = auctionShopMapper.selectAuctionShopDetailsByShopId(shopId);
		return auctionShop;
	}

}
